Skip to content

Conversation

@Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Oct 17, 2025

Jira URL

https://jira.xwiki.org/browse/XWIKI-20953

Changes

Description

  • Updated the translation
  • Hid the autosave frequency input instead of disabling it
  • Renamed all the frequency occurences to interval since a frequency is not measured in minutes... (and the change of translation key made it easy to do right now :) )
  • Misc typo/quality fixes in autosave.js

Screenshots & Video

Here is the new look of the input:
Screenshot from 2025-10-17 18-24-22
Screenshot from 2025-10-17 18-24-15

This is surely not a flawless design, but it fixes the main usability issue without moving too far from what it was.

Executed Tests

Manual tests, see screenshots above.
Could not find the autosave frequency input in the expected page object:

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • None.

* WIP, somehow the js fails...
* Updated CSS
* Fixed the error in the .js
* Moved a flamingo patch to the main CSS of this element (since flamingo is supposed to be the main now anyways).
* Moved a flamingo patch to the main CSS of this element (since flamingo is supposed to be the main now anyways).
@Sereza7 Sereza7 requested a review from michitux October 29, 2025 10:46
@Sereza7 Sereza7 requested a review from surli October 29, 2025 10:50
Copy link
Contributor

@michitux michitux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, the UI changes look good to me. I don't agree with the breaking API change, though. Even if it shouldn't be used anywhere (haven't checked), it's a documented public API that we can't break without vote. As the API change isn't related to the UI changes, I would suggest not performing it. I've also searched a bit and found this discussion which suggests that it is okay to say "save at a frequency of once every X minutes" so I'm not sure that "frequency" is that wrong.

core.edit.wikiToolbar.velocitytext=#* Your velocity code here *#
core.edit.autosave=Autosave
core.edit.autosave.every=every
core.edit.autosave.interval.label=Autosave interval (in mins)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term "mins" is colloquial English, I think we should use a proper formal term like "minutes".

core.register.successful={0} ({1}): Registration successful.

#######################################
## until 17.9.0RC1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## until 17.9.0RC1
## until 17.10.0RC1

enabled: false,
/** If enabled, how frequent are the savings */
frequency: 5, // minutes
interval: 5, // minutes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking API change as this is a public API, e.g., documented at https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/FrontendResources/Autosave/. I would suggest not modifying the API and just modifying the displayed text.

this.setTimeUnit();
frequencyLabel.appendChild(document.createTextNode(" "));
frequencyLabel.appendChild(this.timeUnit);
autosaveLabel.appendChild(document.createTextNode("$escapetool.javascript($services.localization.render('core.edit.autosave'))"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be much simpler to use the append method here (if this is a proper Element and not just something from Prototype, if not it might be a good reason to migrate away from Prototype).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants